﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="dsCities" targetNamespace="http://tempuri.org/dsCities.xsd" xmlns:mstns="http://tempuri.org/dsCities.xsd" xmlns="http://tempuri.org/dsCities.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" GeneratorFunctionsComponentClassName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" UserFunctionsComponentName="QueriesTableAdapter" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="dsConnString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="dsConnString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.DAL.Properties.Settings.GlobalReference.Default.dsConnString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="dtCityTableAdapter" GeneratorDataComponentClassName="dtCityTableAdapter" Name="dtCity" UserDataComponentName="dtCityTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="dsConnString (Settings)" DbObjectName="TIMS.dbo.dtCity" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[dtCity] WHERE (([CodeID] = @Original_CodeID) AND ((@IsNull_hName = 1 AND [hName] IS NULL) OR ([hName] = @Original_hName)) AND ((@IsNull_mgrid = 1 AND [mgrid] IS NULL) OR ([mgrid] = @Original_mgrid)) AND ((@IsNull_hrclvl = 1 AND [hrclvl] IS NULL) OR ([hrclvl] = @Original_hrclvl)) AND ((@IsNull_hrccrt = 1 AND [hrccrt] IS NULL) OR ([hrccrt] = @Original_hrccrt)))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_CodeID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CodeID" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_hName" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="hName" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_hName" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="hName" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_mgrid" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="mgrid" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_mgrid" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="mgrid" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_hrclvl" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="hrclvl" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int16" Direction="Input" ParameterName="@Original_hrclvl" Precision="0" ProviderType="SmallInt" Scale="0" Size="0" SourceColumn="hrclvl" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_hrccrt" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="hrccrt" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_hrccrt" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="hrccrt" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[dtCity] ([hName], [mgrid], [hrclvl], [hrccrt]) VALUES (@hName, @mgrid, @hrclvl, @hrccrt);
SELECT CodeID, hName, mgrid, hrclvl, hrccrt FROM dtCity WHERE (CodeID = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@hName" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="hName" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@mgrid" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="mgrid" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int16" Direction="Input" ParameterName="@hrclvl" Precision="0" ProviderType="SmallInt" Scale="0" Size="0" SourceColumn="hrclvl" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@hrccrt" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="hrccrt" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT CodeID, hName, mgrid, hrclvl, hrccrt FROM dbo.dtCity</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[dtCity] SET [hName] = @hName, [mgrid] = @mgrid, [hrclvl] = @hrclvl, [hrccrt] = @hrccrt WHERE (([CodeID] = @Original_CodeID) AND ((@IsNull_hName = 1 AND [hName] IS NULL) OR ([hName] = @Original_hName)) AND ((@IsNull_mgrid = 1 AND [mgrid] IS NULL) OR ([mgrid] = @Original_mgrid)) AND ((@IsNull_hrclvl = 1 AND [hrclvl] IS NULL) OR ([hrclvl] = @Original_hrclvl)) AND ((@IsNull_hrccrt = 1 AND [hrccrt] IS NULL) OR ([hrccrt] = @Original_hrccrt)));
SELECT CodeID, hName, mgrid, hrclvl, hrccrt FROM dtCity WHERE (CodeID = @CodeID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@hName" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="hName" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@mgrid" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="mgrid" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int16" Direction="Input" ParameterName="@hrclvl" Precision="0" ProviderType="SmallInt" Scale="0" Size="0" SourceColumn="hrclvl" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@hrccrt" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="hrccrt" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_CodeID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CodeID" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_hName" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="hName" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_hName" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="hName" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_mgrid" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="mgrid" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_mgrid" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="mgrid" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_hrclvl" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="hrclvl" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int16" Direction="Input" ParameterName="@Original_hrclvl" Precision="0" ProviderType="SmallInt" Scale="0" Size="0" SourceColumn="hrclvl" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_hrccrt" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="hrccrt" SourceColumnNullMapping="true" SourceVersion="Original" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_hrccrt" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="hrccrt" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="CodeID" ColumnName="CodeID" DataSourceName="TIMS.dbo.dtCity" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@CodeID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="CodeID" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="CodeID" DataSetColumn="CodeID" />
              <Mapping SourceColumn="hName" DataSetColumn="hName" />
              <Mapping SourceColumn="mgrid" DataSetColumn="mgrid" />
              <Mapping SourceColumn="hrclvl" DataSetColumn="hrclvl" />
              <Mapping SourceColumn="hrccrt" DataSetColumn="hrccrt" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="dsConnString (Settings)" DbObjectName="TIMS.dbo.speIns_dtCity" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="speIns_dtCity" Modifier="Public" Name="speIns_dtCity" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="speIns_dtCity">
                <SelectCommand>
                  <DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
                    <CommandText>dbo.speIns_dtCity</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="InputOutput" ParameterName="@CodeID" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@hName" Precision="0" ProviderType="NVarChar" Scale="0" Size="100" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@mgrid" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
          <DbSource ConnectionRef="dsConnString (Settings)" DbObjectName="TIMS.dbo.speDel_Oper" DbObjectType="StoredProcedure" GenerateShortCommands="true" GeneratorSourceName="speDel_Oper" MethodsParameterType="CLR" Modifier="Public" Name="speDel_Oper" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="speDel_Oper">
            <SelectCommand>
              <DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
                <CommandText>dbo.speDel_Oper</CommandText>
                <Parameters>
                  <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
                  <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@Oper_Id" Precision="0" ProviderType="Char" Scale="0" Size="3" SourceColumnNullMapping="false" SourceVersion="Current" />
                </Parameters>
              </DbCommand>
            </SelectCommand>
          </DbSource>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="dsCities" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_DataSetName="dsCities" msprop:Generator_UserDSName="dsCities" msprop:EnableTableAdapterManager="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="dtCity" msprop:Generator_UserTableName="dtCity" msprop:Generator_RowDeletedName="dtCityRowDeleted" msprop:Generator_TableClassName="dtCityDataTable" msprop:Generator_RowChangedName="dtCityRowChanged" msprop:Generator_RowClassName="dtCityRow" msprop:Generator_RowChangingName="dtCityRowChanging" msprop:Generator_RowEvArgName="dtCityRowChangeEvent" msprop:Generator_RowEvHandlerName="dtCityRowChangeEventHandler" msprop:Generator_TablePropName="dtCity" msprop:Generator_TableVarName="tabledtCity" msprop:Generator_RowDeletingName="dtCityRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="CodeID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="CodeID" msprop:Generator_ColumnPropNameInRow="CodeID" msprop:Generator_ColumnVarNameInTable="columnCodeID" msprop:Generator_ColumnPropNameInTable="CodeIDColumn" type="xs:int" />
              <xs:element name="hName" msprop:Generator_UserColumnName="hName" msprop:Generator_ColumnPropNameInRow="hName" msprop:Generator_ColumnVarNameInTable="columnhName" msprop:Generator_ColumnPropNameInTable="hNameColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="mgrid" msprop:Generator_UserColumnName="mgrid" msprop:Generator_ColumnPropNameInRow="mgrid" msprop:Generator_ColumnVarNameInTable="columnmgrid" msprop:Generator_ColumnPropNameInTable="mgridColumn" type="xs:int" minOccurs="0" />
              <xs:element name="hrclvl" msprop:Generator_UserColumnName="hrclvl" msprop:Generator_ColumnPropNameInRow="hrclvl" msprop:Generator_ColumnVarNameInTable="columnhrclvl" msprop:Generator_ColumnPropNameInTable="hrclvlColumn" type="xs:short" minOccurs="0" />
              <xs:element name="hrccrt" msprop:Generator_UserColumnName="hrccrt" msprop:Generator_ColumnPropNameInRow="hrccrt" msprop:Generator_ColumnVarNameInTable="columnhrccrt" msprop:Generator_ColumnPropNameInTable="hrccrtColumn" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="120" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:dtCity" />
      <xs:field xpath="mstns:CodeID" />
    </xs:unique>
  </xs:element>
  <xs:annotation>
    <xs:appinfo>
      <msdata:Relationship name="FK_dtCity_dtCity" msdata:parent="dtCity" msdata:child="dtCity" msdata:parentkey="CodeID" msdata:childkey="mgrid" msprop:Generator_UserRelationName="FK_dtCity_dtCity" msprop:Generator_RelationVarName="relationFK_dtCity_dtCity" msprop:Generator_UserChildTable="dtCity" msprop:Generator_UserParentTable="dtCity" msprop:Generator_ParentPropName="dtCityRowParent" msprop:Generator_ChildPropName="GetdtCityRows" />
    </xs:appinfo>
  </xs:annotation>
</xs:schema>